<extend name="Public/base"/>
<block name="style">
    <style>
        .btn-jujue{background: #FF1717;}
        .btn-jujue:hover{background-color: #8d8d8d;}
    </style>
</block>
<block name="body">
    <div class="main-title">
        <h2></h2>
    </div>
    <form action="{:U('tongguoOtherPrice')}" method="post" class="form-horizontal">
        <input type="hidden" name="id" id="id" value="{$data['order_id']}">
        <div style="overflow: hidden;width: 100%;" class="form-item">
            <div style="float: left;width: 30%;">
                <div style="width: 100px;height: 40px;line-height: 40px;text-align: left;font-size: 15px;margin-bottom: 15px;color: #000;font-weight: bold;">提箱信息</div>
                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            进港码头：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['dock_name']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            货重：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['weight_desc']}</div>
                    </li>
<!--                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            提箱费：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['box_no']}</div>
                    </li>-->
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            额外费用凭证：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">
                            <notempty name="data.other_price_img">
                                <volist name="data.other_price_img" id="vo">
                                    <a href='__ROOT__{$vo}' target='_blank'><img src="{$vo}" width="50px" height='50px'></a>
                                </volist>
                            </notempty>
                        </div>
                    </li>
                    <?php if($data['order_status']>31):?>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            平台加价：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['admin_price']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            拒绝原因：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['other_pay_refuse']}</div>
                    </li>

                    <?php endif;?>

                </ul>
            </div>
            <div style="float: left;width: 30%;">
                <div style="width: 100px;height: 40px;line-height: 40px;text-align: center;font-size: 18px;margin-bottom: 15px;"></div>
                <ul >
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            其他费用：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['other_price']}</div>
                    </li>
                    <li style="margin-bottom: 15px;overflow: hidden;line-height: 16px;">
                        <div style="text-align: left;float: left;font-weight: bold;font-size: 14px;">
                            其他费用说明：
                        </div>
                        <div style="float:left;margin-left: 10px;font-size: 14px;">{$data['other_price_desc']}</div>
                    </li>

                </ul>
            </div>

        </div>
        <?php if($data['order_status']==31&&IS_CHEDUI<=0):?>
        <div class="form-item">
            <label class="item-label">平台加价：</label>
            <div class="controls">
                <input type="text" class="text input-large" name="admin_price" value="" placeholder="例如：100">
            </div>
        </div>

        <?php endif;?>


        <div class="form-item">
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            <?php if($data['order_status']==31&&IS_CHEDUI<=0):?>
            <a class="btn btn-return" data-id="{$order_id}" id="jujue" >拒 绝</a>
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal" >通 过</button>
            <?php endif;?>
        </div>
    </form>
    <div class="show-box-back"  style="display: none;">
    </div>
    <!-- 审核拒绝框 -->
        <div class="show-box" id="js-jujue" style="display: none;">
            <input type="hidden"  id="js-jujue-id">
            <div class="show-box-msg" >
                提示
            </div>
            <div class="show-box-msg-title">
                拒绝原因:
            </div>
            <div class="show-box-msg-area">
                <textarea class="show-box-msg-area" name="refund_desc" id="refund_desc" rows="3" cols="35"></textarea>
            </div>
            <div class="show-box-bottom">
                <button class="js-show-btn-cancel btn btn-return" >返 回</button>
                <button class="btn submit-btn" id="submit-jujue" >确 定</button>

            </div>
        </div>


</block>

<block name="script">
    <script>

    </script>
    <script type="text/javascript">

        $("#jujue").click(function () {
            var id = $(this).attr("data-id");
            $('#js-jujue').show();
            $('.show-box-back').show();
            $('#js-jujue-id').val(id);
        });

        $("#submit-jujue").click(function () {
            var id = $("#js-jujue-id").val();
            var refund_desc = $("#refund_desc").val();
            $.post("{:U('jujueOtherPrice')}", {id: id, refund_desc: refund_desc}, function (res) {
                if (res.status) {
                    updateAlert('拒绝成功', 'alert-success');
                    setTimeout(function () {
                        location.reload();
                    }, 1500);
                }
            });

        });
        //导航高亮
        highlight_subnav('{:U('Order / otherPirce')}');
    </script>
</block>
